package com.twu.biblioteca.model.menu;

/**
 * Created with IntelliJ IDEA.
 * User: cschlumb
 * Date: 08/08/2013
 * Time: 09:49
 * To change this template use File | Settings | File Templates.
 */
public class MenuFormatter{
    private final StringBuilder stringBuilder;

    public MenuFormatter() {
        stringBuilder = new StringBuilder();
    }

    public void add(int i, IMenu menuItem) {
        stringBuilder.append(i);
        stringBuilder.append(") ");
        stringBuilder.append(menuItem.toString());
        stringBuilder.append('\n');
    }

    public String toFormattedString(){
        return stringBuilder.toString();
    }
}
